import 'package:freezed_annotation/freezed_annotation.dart';
part 'login_model.freezed.dart';
part 'login_model.g.dart';

@freezed
class LoginModel with _$LoginModel {
  const factory LoginModel({
    @Default([]) List<LoginDataModels> login,
  }) = _LoginModel;

  factory LoginModel.fromJson(Map<String, dynamic> json) => _$LoginModelFromJson(json);
}

@freezed
class LoginDataModels with _$LoginDataModels {
  const factory LoginDataModels({
    required String id,
    required String account,
    required String mobile,
    required String token,
    required String avatar,
    required String nickname,
    required String gender,
    required String birthday,
    required String cityCode,
    required String provinceCode,
    required String profession,
  }) = _LoginDataModels;

  factory LoginDataModels.fromJson(Map<String, dynamic> json) => _$LoginDataModelsFromJson(json);
}

